using B.S.NewMedical.Api.Read.DTOS.VisitRecord;
using B.S.NewMedical.ErrorCode;
using MediatR;
using System.Collections.Generic;

namespace B.S.NewMedical.Api.Read.Application.Command.ContentManagement.VisitRecord
{
    /// <summary>
    /// 根据患者ID获取就诊记录列表命令
    /// </summary>
    public class GetVisitRecordsByPatientIdCommand : IRequest<ApiPageing<List<VisitRecordDto>>>
    {
        /// <summary>
        /// 患者ID
        /// </summary>
        public int PatientId { get; set; }

        /// <summary>
        /// 查询条件
        /// </summary>
        public VisitRecordQueryDto QueryDto { get; set; }

        public GetVisitRecordsByPatientIdCommand(int patientId, VisitRecordQueryDto? queryDto = null)
        {
            PatientId = patientId;
            QueryDto = queryDto ?? new VisitRecordQueryDto();
            // 确保查询条件中的PatientId与参数一致
            QueryDto.PatientId = patientId;
        }
    }
}